#ifndef _KMOS_H_
#define _KMOS_H_
/***************************************************************/
#define KUART_RX_BYTES 	20                  // 
#define KUART_TX_BYTES 	40                  // 
/***************************************************************/
typedef struct{
  
    u8 tx_buf[KUART_TX_BYTES];
    u8 rx_buf[KUART_RX_BYTES];

    u8 rx_byte_tmr;
    u16 err_tmr_ct;
    u16 err_clr_ct;

    u8 tx_ct;
    u8 rx_ct;

    u8 sending_f;
    u8 recved_f;
}KUART_t;
extern KUART_t          kmos_comm;
extern u8               rekmosdate[9];
extern u8               sendkmosdate[4];
extern u8               gu8_komssendwait;
extern bool             gb_handshake;
extern bool             kmosl_firoff_f;
extern bool             kmosr_firoff_f;
extern u16              kmos_ltemper;
extern u16              kmos_mtemper;
extern u16              kmos_rtemper;

void Kuart_init(void);
void send_kmos_comm(void);
void receive_koms_deal(void);
void Kuart_byte_tmr_dn(KUART_t * c_uart);
void Kuart_recv_byte_isr(void);
void Kuart_send_byte_isr(void);
#endif


